package org.jsola.contract.common;

/**
 * redis缓存key都定义在该类
 *
 * @author JanusMix
 */
public class CacheKeyKit {

    private static final String PRE_FIX = "jsola:contract";


    /**
     * 合同发起的key
     *
     * @param subjectId 业务id
     * @return 合同发起的key
     */
    public static String getCreateSignLockKey(String subjectId) {
        return PRE_FIX + ":create:sign:" + subjectId;
    }


    /**
     * 短信余量的key
     *
     * @param subjectId 站点id
     * @return 短信余量的key
     */
    public static String getContractMargin(String subjectId) {
        return PRE_FIX + ":smsMargin:siteId:" + subjectId;
    }

    /**
     * 修改合同变量的key
     *
     * @return 修改合同变量的key
     */
    public static String getContractVariable() {
        return PRE_FIX + ":contractVariable";
    }

    /**
     * 合同签署是否发送通知变量控制
     *
     * @return key
     */
    public static String getSendNoticeLockKey() {
        return PRE_FIX + ":isSend";
    }

}
